﻿using Box2DX.Dynamics;

namespace Expression.Samples.Physics {
	public class SimpleBoundaryListener: BoundaryListener {

		public delegate void ViolationDelegate(Body body);

		public SimpleBoundaryListener(ViolationDelegate violation) {
			this.Delegate = violation;
		}

		public ViolationDelegate Delegate { get; private set; }


		public override void Violation(Body body) {
			this.Delegate.Invoke(body);
		}
	}
}
